<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<div class="page_right indexpage_right">
    <div class="indexpage_right_date">
        <p style="text-align:left; text-indent:38px;">
            <span>日期</span>
            <input class="Wdate" type="text" id="stime" onClick="WdatePicker()">
            <span>至</span>
            <input class="Wdate" type="text" id="etime" onClick="WdatePicker()">
            <a class="placeAndEquipment_search" href="javascript:;">查询</a>
        </p>
        <ul class="timeType">
            <li><a href="javascript:;" class="${cur==1?'cur':''}" >今日</a></li>
            <li><a href="javascript:;" class="${cur==2?'cur':''}" >本周</a></li>
            <li><a href="javascript:;" class="${cur==3?'cur':''}" >本月</a></li>
            <li><a href="javascript:;" class="${cur==4?'cur':''}" >昨日</a></li>
            <li><a href="javascript:;" class="${cur==5?'cur':''}" >上周</a></li>
            <li><a href="javascript:;" class="${cur==6?'cur':''}" >上月</a></li>
        </ul>
        <p id="GC_balance_time" style="clear:both;line-height:50px;text-align:center;background:#f7f7f7;">
            ${stime}
            <c:if test="${not empty etime}">
                &nbsp;~&nbsp;&nbsp;${etime}
            </c:if>
        </p>
    </div>
    <div class="indexpage_right_all">
        <p class="indexpage_right_total" style="width:860px;padding:0 30px;text-indent:0;"><span>总计：</span><span style="margin-right:0;">￥<f id="GC_balance_grossIncome">${AccountSummary.grossIncome}</f></span></p>
        <p>收入情况</p>
        <ul>
            <li><span>现金</span><br><span><f id="GC_balance_cashIncome">${AccountSummary.cashIncome}</f>元</span></li>
            <li><span>一元硬币</span><br><span><f id="GC_balance_iconIncome">${AccountSummary.iconIncome}</f>元</span></li>
            <li><span>微信</span><br><span><f id="GC_balance_wechatpayIncome">${AccountSummary.wechatpayIncome}</f>元</span></li>
            <li><span>支付宝</span><br><span><f id="GC_balance_alipayIncome">${AccountSummary.alipayIncome}</f>元</span></li>
            <li class="currency"><span>游戏币</span><br><span><f id="GC_balance_gameCoinQuantity">${AccountSummary.gameCoinQuantity}</f></span></li>
            <li style="color:#38adff;"><span>出币</span><br><span><f id="GC_balance_outGameCoinQuantity">${AccountSummary.outGameCoinQuantity}</f></span></li>
            <li><span>出礼品</span><br><span><f id="GC_balance_giftSellQuantity">${AccountSummary.giftSellQuantity}</f></span></li>
            <li><span>远程补币</span><br><span><f id="GC_balance_remotelyOutGameCoinQuantity">${AccountSummary.remotelyOutGameCoinQuantity}</f></span></li>
        </ul>
    </div>
    <div class="indexpage_right_echart">
        <p>统计图<a class="indexpage_echartcut" href="javascript:;">切换查看占比率</a></p>
        <div class="indexpage_echart" id="indexpage_barchart"></div>
        <div class="indexpage_echart" id="indexpage_ratechart"></div>
    </div>
</div>
<script src="${basePath}resources/js/v2/echarts.min.js"></script>
<script src="${basePath}resources/js/v2/accountClick.js"></script>
<script src="${basePath}resources/js/v2/getOption.js"></script>
<script type="application/javascript">
    //依据选择周期跳转
    var uri = "${basePath}v2/account/";
    var place = "${placeId}";
    var device = "${deviceId}";
    if(place==null){
        place=0;
    }else if(device==null){
        device=0;
    }

    $(".timeType a").each(function(n){
        $(this).click(function(){
            getUri1(uri,n,place,device);
        });
    });

    var cashIncome = $("#GC_balance_cashIncome").text().replace(/,/g,'');
    var iconIncome = $("#GC_balance_iconIncome").text().replace(/,/g,'');
    var wechatpayIncome = $("#GC_balance_wechatpayIncome").text().replace(/,/g,'');
    var alipayIncome = $("#GC_balance_alipayIncome").text().replace(/,/g,'');
    var gameCoinQuantity = $("#GC_balance_gameCoinQuantity").text().replace(/,/g,'');
    var outGameCoinQuantity = $("#GC_balance_outGameCoinQuantity").text().replace(/,/g,'');
    var giftSellQuantity = $("#GC_balance_giftSellQuantity").text().replace(/,/g,'');
    var remotelyOutGameCoinQuantity = $("#GC_balance_remotelyOutGameCoinQuantity").text().replace(/,/g,'');

    //条形统计图
    var myBarChart=echarts.init(document.getElementById("indexpage_barchart"));
    var barOption = getBarOption(cashIncome,iconIncome,wechatpayIncome,
        alipayIncome,gameCoinQuantity,outGameCoinQuantity,
        giftSellQuantity,remotelyOutGameCoinQuantity
     );
    myBarChart.setOption(barOption);

    //百分比统计图
    var myPieChart=echarts.init(document.getElementById("indexpage_ratechart"));
    var pieOption = getPieOption(cashIncome,iconIncome,wechatpayIncome,alipayIncome);
    myPieChart.setOption(pieOption);
</script>